{extend name='public/layer_base' /}
{block name='content'}
<div class="layui-fluid content">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-row">
                <form class="layui-form" method="post">
                    <!-- 表单字段区域 -->
                        <div class="layui-form-item">
    <label for="status" class="layui-form-label">状态</label>
    <div class="layui-input-inline">
    <input type="hidden" name="status" id="status" value="{$data.status|default='1'}">

    <input type="checkbox" lay-skin="switch" lay-text="是|否"  value="1" {if(isset($data) && $data.status==1)}checked{/if}>
    </div>
</div>
<script>
layui.use('form', function () {
    var form = layui.form;
    form.on('switch(status)', function () {
        console.log(this.checked);
        if(this.checked){
            $('#status').val('1');
        }else{
            $('#status').val('0');
        }
    });
})
</script>


<div class="layui-form-item">
    <label for="install" class="layui-form-label">是否安装</label>
    <div class="layui-input-inline">
        <input id="install" name="install" value="{$data.install|default='1'}" placeholder="请输入是否安装" type="text"   class="layui-input" >
    </div>
</div>

                    <!-- 表单底部 -->
                            <div class="layui-form-item">
                        <label for="L_repass" class="layui-form-label"></label>
                        <button class="layui-btn" lay-filter="submit" id="submit" lay-submit="submit"
                            type="button">保存</button>
                               <button type="reset" class="layui-btn layui-btn-primary">
                            重置
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

{/block}